# Makefile for Starflub
#   written by Anshu Chimala

SOURCES=boot.o gdt.o interrupt.o common.o monitor.o stdio.o string.o isr.o descriptor_tables.o main.o timer.o SFInit.o memory.o paging.o ordered_map.o initrd.o filesystem.o task.o process.o frames.o clone.o pipe.o asm.o ../drivers/keyboard.o ../drivers/video.o ../libs/lib_vga.o ../libs/libSFUI.o ../drivers/mouse.o

CFLAGS=-nostdlib -nostdinc -fno-builtin -fno-stack-protector -I../include -O
LDFLAGS=-Tlink.ld
ASFLAGS=-felf

all: $(SOURCES) link 

clean:
	-rm *.o kernel

link:
	ld $(LDFLAGS) -o kernel $(SOURCES) 

.s.o:
	nasm $(ASFLAGS) $<
 
